package com.myph.phctrl_t;

import com.example.phctrl_t.R;
import com.myph.model.Util;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.DisplayMetrics;
import android.widget.Button;

public class MainActivity extends Activity {
    public static int screenw;
    public static int screenh;

    private final Handler timeHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            super.handleMessage(msg);
            switch (msg.what) {
            case 1:
                Util.initInfo(MainActivity.this);

                // ShowChart sc = new ShowChart();
                // IDemoChart[] mCharts = new IDemoChart[] {sc};
                // Intent intent = mCharts[0].execute(getApplicationContext());
                // startActivity(intent);
                break;
            default:
                break;
            }
        }
    };

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        DisplayMetrics dm = new DisplayMetrics();

        screenw = dm.widthPixels;
        screenh = dm.heightPixels;

        timeHandler.sendMessageDelayed(timeHandler.obtainMessage(1), 800);

    }

}
